Options and controls for automatically and manually aligning image slices and then stitching the result in a single large image are available in the Stitcher panel, shown belowl.
Stitcher panel
A. Edit Layout B. Actions C. Stitching options D. Blend options E. Output options
Click the Edit Layout button to open the Layout Editor dialog. If required, you can modify the current grid layout by selecting a new layout (see Assembling Image Grids).
Controls for selecting image tiles in the Stitching workspace, as well as options for applying LUTs to selections, are available in the Actions box.
Actions and selection options
The available actions and selection options are described in the following table.
|
|
Description |
|---|---|
|
|
Select Reference… Lets you add to or remove tile(s) from the Reference selection. NOTE Hold down Left-Ctrl to select multiple tiles. Multiple-tile selections can also be made by a configured number of tiles within a row and/or column. |
|
|
Select To Stitch… Lets you add to or remove tile(s) from the To Stitch selection. NOTE Hold down Left-Ctrl to select multiple tiles. Multiple-tile selections can also be made by a configured number of tiles within a row and/or column. |
|
|
Select All… Selects all tiles in the mosaic for the current type of selection — Reference or To Stitch — in the current layer. |
|
|
Discard… Removes the selected tile(s) from the mosaic. |
|
|
Undo… Undoes the last stitching operation or the last manual translation or rotation that was applied to the selected image tile. |
|
|
Redo… Redoes the last stitching operation or the last manual translation or rotation that was undone for the selected image tile. |
|
|
Send to Back… Sends the selected tile(s) to the back of the mosaic. |
|
|
Bring to Front… Brings the selected tile(s) to the front of the mosaic. |
|
|
Fit… Fits the whole mosaic within the workspace. Note If you need to fit a selected image tile(s) within the workspace, you must click the Fit to View button on the Manipulate panel (see Using the Manipulate Tools). Note You can do the following if you need the pivot point to appear at the center of an image tile when you are working with the Image Stitcher:
|
|
Selection options |
Lets you choose how to make multiple-tile selections, either by rows, columns, or both, and by a selected number of tiles. You can also change or edit the LUTs applied to the Reference or to the To Stitch selections (see Using the LUT Editor). |
Automatic and manual alignment methods, as well as their settings and application options, are available in the Stitching box. Previews are also available to help evaluate the results of an automated matching method.
Stitching settings
The available methods and settings are described in the following table.
|
|
Description |
|---|---|
|
Method |
Lets you choose an alignment method as follows: Template Matching (translation)… Searches for the location of a template image, or sub image, within a To Stitch image tile that matches with the reference image tile (see Template Matching). Feature Base… The selected keypoint detector will be applied to detect stable keypoints and select the strongest matching features between adjacent image tiles (see Feature Base). Value Stitcher… Lets you apply selected translation and/or rotation values to selected image tiles (see Value Stitcher). |
|
Application |
Determines how image tiles will be stitched and the order in which they will be stitched. These stitching patterns include Pairwise, Grid, Sequence, and Flower. Note The available stitching patterns are dependent on the selected alignment method. |
|
Min Overlap (%) |
Lets you choose the minimum overlap that must be present for the stitching operation to be applied. Note If there is any gap between the image tiles that you choose to stitch, you must set this parameter to 0. |
|
Current Selection |
If selected, stitching will be applied only to the selected image tiles within the current layer. |
|
Multiple Slices |
If selected, stitching will be applied to the selected image tiles within the current layer, as well as to corresponding image tiles within the 3D stack. |
|
Stitch |
Applies the required geometric transformations to the image tiles selected for stitching to match the criteria of selected alignment method. |
Template Matching is a method for automatically searching for and finding the location of a template image, or sub image, within a To Stitch image tile that matches with the reference image tile. It simply slides the template image over the input image (as in 2D convolution), determines the best location for the template, and applies the required translation to match the overlapping region. Several template matching methods, described below, are implemented in Dragonfly's Image Stitcher.
When working with Template Matching, the template created will represent 5% of the Reference tile size and will be used to search all of the selected To Stitch tile to find the best match for the template.
Template Matching can be one of the fastest methods for aligning overlapping image tiles. However, you should note that template matching may perform poorly in cases in which rotations, repetitive patterns, or large contrast changes are present between image tiles in the Stitching workspace. Excessive noise may also limit the effectiveness of template matching.
Template Matching settings
| Description | |
|---|---|
|
Template matching method |
Lets you select a template matching method, as follows. Cross-Correlation Normed… Is a measure of similarity as a function of the displacement of one relative to the other. Cross-correlation is similar in nature to the convolution of two functions. However, this measure can be sensitive to the presence of "outliers" that appear in one image, but not in others. This limitation can lead to biased matches. Square Difference… Is a measure of variation or deviation as represented by the squares of the variations from the mean. The performance of this method is done by making comparisons based on the value of the correlation coefficient that is produced from different template images. Refer to https://docs.opencv.org/3.2.0/df/dfb/group__imgproc__object.html#ga3a7850640f1fe1f58fe91a2d7583695d for more information about the available template matching methods. |
|
Preview Template Matching |
The preview for template matching returns a grayscale image, the matching result, in which each pixel denotes how much the neighborhood of that pixel matches with the template. The detected template is also highlighted on the To Stitch image tile, as shown below. Note The maximum intensity values (white) returned for the cross-correlation normed matching method indicates the best matches, while low intensity values (black) returned for the square difference matching method indicates the best matches. |
|
Application |
Determines how the selected image tiles will be stitched. The application options, or stitching patterns, for the Template Matching method include the following and must be considered based on image content. Pairwise… The selected To Stitch image tile will be stitched to the selected Reference image tile. Grid… The selected reference image tiles in the mosaic will be stitched in the order in which they were acquired. You should note that in this stitching pattern, the first image will be considered to be the reference image and that all image tiles need to be selected. You can click the Select All button to select all the image tiles. Sequence: 1-to-1… The selected reference image tiles will be stitched in the selected order one-by-one. Order options for this application include the following: Manual. Image tiles will be stitched in the order in which they were selected. For example, if four image tiles were selected, then the second tile selected will be stitched to the first tile selected, the third tile selected will be stitched to the second tile, and then the fourth tile selected will be stitched to the third tile. Snake by rows. Image tiles will be stitched in a grid, one row after another. After a row is finished the next one starts in reverse order at the position where the previous row ended. The snake by rows options are further described below. Right and Down. Starts on the top left and goes right, then one line down and left, then down and right, and so on. Left and Down. Starts on the top right and goes left, then one line down and right, then down and left, and so on. Right and Up. Starts on the bottom left and goes right, then one line up and left, then up and right, and so on. Left and Up. Starts on the bottom right and goes left, then one line up and right, then up and left, and so on. Snake by columns. Image tiles will be stitched in a grid, one column after the other. After a column is finished the next one starts in reverse order at the position where the previous one ended. The snake by columns options are further described below. Right and Down. Starts on the top left and goes down, then one column right and up, then right and down, and so on. Left and Down. Starts on the top right and goes down, then one column left and up, then left and down, and so on. Right and Up. Starts on the bottom left and goes up, then one column right and down, then right and up, and so on. Left and Up. Starts on the bottom right and go up, then one column left, then down, then left, then up, and so on. Flower pairwise… Image tiles will be stitched in a circular, or flower-like, pattern pair-by-pair from a calculated or selected starting point. When calculated, the starting point is set in the center of the selected image tiles. |
The options and settings for the Feature Base image stitching method let you select a feature detector, as well as choose the type of motion allowed and the maximum number of iterations. Previews are available to help you evaluate the effectiveness and accuracy of feature-based matching for your stitching requirements.
When working with the Feature Base stitching method, the algorithm will consider 100% of the Reference image tile size and 100% of the To Stitch tile size when searching for the best matches.
Feature Base settings
| Description | |
|---|---|
|
Feature Detector |
Lets you select the keypoint detector that will be applied to detect stable keypoints and select the strongest matching features between adjacent Reference and To Stitch image tiles. The main differences that you may note between feature detectors is the total number of features detected, rather than the accuracy of feature detection. ORB… Implements the ORB (oriented BRIEF) keypoint detector and descriptor extractor described in Orb: an efficient alternative to sift or surf, Ethan Rublee, Vincent Rabaud, Kurt Konolige, and Gary Bradski. In Computer Vision (ICCV), 2011 IEEE International Conference on, pages 2564–2571. IEEE, 2011. BRISK… Implements the BRISK keypoint detector and descriptor extractor, described in Brisk: Binary robust invariant scalable keypoints, Stefan Leutenegger, Margarita Chli, and Roland Yves Siegwart. In Computer Vision (ICCV), 2011 IEEE International Conference on, pages 2548–2555. IEEE, 2011. AKAZE… Implements the AKAZE keypoint detector and descriptor extractor, described in Fast explicit diffusion for accelerated features in nonlinear scale spaces, Pablo F. Alcantarilla, Jesús Nuevo, and Adrien Bartoli. Trans. Pattern Anal. Machine Intell, 34(7):1281–1298, 2011. |
|
Motion |
Lets you specify the type of motion(s) that will be allowed for applying the geometric transforms required to align image tiles in terms of the Feature Base criterion. Translation… Sets a translational transformation as the motion model. Rotation… Sets a rotational transformation as the motion model. Note Do not select Rotation unless you are sure that the image tiles contain a rotational motion. |
|
Epsilon |
Defines the threshold of the feature base correlation. In general, reducing Epsilon may be required in cases in which mismatched features are noted when you preview features. |
|
Number of Iterations |
Determines the maximum number of iterations that will be run when the Stitch button is clicked. |
|
Preview Feature |
The preview for Feature Base comparisons, shown below, stacks two images horizontally and draws lines from the Reference image tile to the adjacent To Stitch image tile and shows the best matches for the total number of features requested for the preview. You should note that in cases in which you notice mismatches, you may have to reduce Epsilon. Number of Features… Lets you specify the maximum number of corners to return for the preview. If there are more corners than requested, the strongest matches will be returned. |
|
Application |
Determines how the selected image tiles will be stitched. The application options, or stitching patterns, for the Feature Base method include the following and must be considered based on image content. Pairwise… The selected To Stitch image tile will be stitched to the selected Reference image tile. Grid… Adjacent image tiles will be stitched in the order in which they were acquired. You should note that in this stitching pattern, the first image selected will be considered to be the reference image and that all image tiles need to be selected. You can click the Select All button to select all the image tiles. Flower… Image tiles will be stitched in a flower-like, or circular, pattern from a calculated or selected starting point. When calculated, the starting point is set in the center of the selected image tiles. Sequence: Group-to-1… The selected reference image tiles will be stitched in the selected order, in consideration of the reference and previously stitched tiles as illustrated below.
Order options for this application include the following: Manual. Image tiles will be stitched in the order in which they were selected. For example, if four image tiles were selected, then the second tile selected will be stitched to the first tile selected, the third selected tile will be stitched to the second tile, and then the fourth selected tile will be stitched to the third tile. Snake by rows. Image tiles will be stitched in a grid, one row after another. After a row is finished the next one starts in reverse order at the position where the previous row ended. The snake by rows options are further described below. Right and Down. Starts on the top left and goes right, then one line down and left, then down and right, and so on. Left and Down. Starts on the top right and goes left, then one line down and right, then down and left, and so on. Right and Up. Starts on the bottom left and goes right, then one line up and left, then up and right, and so on. Left and Up. Starts on the bottom right and goes left, then one line up and right, then up and left, and so on. Snake by columns. Image tiles will be stitched in a grid, one column after the other. After a column is finished the next one starts in reverse order at the position where the previous one ended. The snake by columns options are further described below. Right and Down. Starts on the top left and goes down, then one column right and up, then right and down, and so on. Left and Down. Starts on the top right and goes down, then one column left and up, then left and down, and so on. Right and Up. Starts on the bottom left and goes up, then one column right and down, then right and up, and so on. Left and Up. Starts on the bottom right and go up, then one column left and down, then left and up, and so on. Note This option can be most expensive computationally as features will be mapped to multiple references and then weighted. Sequence: 1-to-1… The selected reference image tiles will be stitched in the selected order one-by-one. Order options for this application include the following: Manual. Image tiles will be stitched in the order in which they were selected. For example, if four image tiles were selected, then the second tile selected will be stitched to the first tile selected, the third selected tile will be stitched to the second tile, and then the fourth selected tile will be stitched to the third tile. Snake by rows. Image tiles will be stitched in a grid, one row after another. After a row is finished the next one starts in reverse order at the position where the previous row ended. The snake by rows options are further described below. Right and Down. Starts on the top left and goes right, then one line down and left, then down and right, and so on. Left and Down. Starts on the top right and goes left, then one line down and right, then down and left, and so on. Right and Up. Starts on the bottom left and goes right, then one line up and left, then up and right, and so on. Left and Up. Starts on the bottom right and goes left, then one line up and right, then up and left, and so on. Snake by columns. Image tiles will be stitched in a grid, one column after the other. After a column is finished the next one starts in reverse order at the position where the previous one ended. The snake by columns options are further described below. Right and Down. Starts on the top left and goes down, then one column right and up, then right and down, and so on. Left and Down. Starts on the top right and goes down, then one column left and up, then left and down, and so on. Right and Up. Starts on the bottom left and goes up, then one column right and down, then right and up, and so on. Left and Up. Starts on the bottom right and go up, then one column left and down, then left and up, and so on. Flower pairwise… Image tiles will be stitched in a flower-like, or circular, pattern pair-by-pair from a calculated or selected starting point. When calculated, the starting point is set in the center of the selected image tiles.
|
In addition to the automated Template Matching and Feature Base options for automatically aligning image tiles, you can also choose to simply apply selected translation and/or rotation values to selected image tiles. Other options for the Value Stitcher method let you view all transformations applied to the selected image tile, as well as copy the last transformation applied to the selected image tile. You can then apply that transformation to any other image tile.
Value Stitcher settings
Manual translations and rotations can also be applied the Move tool (see Translating and Rotating Objects).
| Description | |
|---|---|
|
Translation in X |
When stitched, the selected image tile(s) will be translated along the X-axis by the selected step size or percentage. |
|
Translation in Y |
When stitched, the selected image tile(s) will be translated along the Y-axis by the selected step size or percentage. |
|
Rotation |
When stitched, the selected image tile(s) will be rotated by the selected degree. |
|
Take translation as % value |
If selected, the translation step(s) will be applied as a percentage of the selected tile size. |
|
Total transformation for selected |
When clicked, the value(s) of all transformations applied to the selected image tile are displayed onscreen.
Note You can move back in history step-by-step by clicking the Undo button in the Actions box. |
|
Copy last transformation of selected |
When clicked, the value(s) of the last transformation applied to the selected image tile are copied to the Translation and Rotation settings. |
|
Application |
The application options for the Value Stitcher method include the following. Selected tiles… Transformations will be applied to the selected image tiles when you click Stitch. |
In cases in which obvious seams appear between image tiles after stitching, you can blend the overlap within the output dataset.
Blend options
|
|
Description |
|---|---|
|
Show Overlap |
If selected, the current overlap between image tiles — as computed with the selected Blend method — will be highlighted in the workspace, as shown below. |
|
Highlight Channels |
If selected, the border of all image tiles will be highlighted in the workspace, as shown below. |
|
Blend Method |
Applies the selected blend method to image data within the overlap areas when Blend Channels is clicked. Mean… In the overlapping area, the mean intensity values of the two image tiles are computed and applied. Sum… In the overlapping area, the intensity values of the two image tiles are added together and applied. Min… In the overlapping area, the minimum intensity values of the two image files are applied in the output image. Max… In the overlapping area, the maximum intensity values of the two image tiles are applied in the output image. Linear… In the overlapping area, intensity values are smoothly adjusted between the two image tiles in the output image. |
|
Blend Channels |
Applies the selected Blend method to the overlapping areas in the mosaic. |
The result of a stitching operation is typically a new dataset in the shape of the stitched image tiles. You can also save a configuration file that contains the coordinates of each stitched image tile in the mosaic. You can apply the saved coordinates to another dataset acquired in a similar manner or you can apply the saved coordinates to reload the original dataset (see Loading Configuration Files).
The Output options are available in the Output box, shown below.
Output options
|
|
Description |
|---|---|
|
Name |
You can enter a new name for the output file in this edit box, if required. |
|
Channel |
If selected, the stitching result will be saved as a new dataset. |
|
Configuration File |
If selected, the coordinates of each image tile contained in the stitching result will be saved in a text file with a .TXT extension. |
|
Save |
Lets you save the selected output option. |